Move MCP templates to the v2 SDKs - #21
Conversation
keycardai-mcp 2.0.0 (PyPI) and @keycardai/mcp 2.0.0 (npm) shipped, so the five templates that were pinned to the v1 line move over. Python (mcp-server-python-mcp, mcp-brokered-credentials-python): keycardai-mcp>=2,<3, drop the interim mcp<2.0 pins. Source: mcp.server.fastmcp -> mcp.server.mcpserver, and streamable_http_path moved from the MCPServer constructor to streamable_http_app(). TypeScript (mcp-server-typescript-express, mcp-brokered-credentials-typescript, autonomous-agent-snowflake-wif): @keycardai/mcp ^2.0.0 and the v2 package split, server code on @modelcontextprotocol/server + /node, client code on @modelcontextprotocol/client (Client, StreamableHTTPClientTransport and the PRM discovery helpers all export from its root). server.tool() is gone in v2, replaced with registerTool(name, config, cb). Handler context carries auth at ctx.http.authInfo instead of ctx.authInfo. zod moves to ^4 (v2 types its schema overloads against zod 4, and z.record now requires an explicit key type). Verified locally: both Python templates resolve keycardai-mcp 2.0.0 with mcp 2.0.0 and import clean; all three TypeScript templates typecheck and build. The repo CI verifies each against a live ephemeral zone. Go templates are untouched: no Go v2 exists and they moved to go-sdk v1.7.0 in #19. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Final PR of the MCP v2 cutover.
keycardai-mcp2.0.0 and@keycardai/mcp2.0.0 are published, so the five templates on the v1 line move over. Go templates are untouched (no Go v2; they got v1.7.0 in #19).Python — 2 templates
keycardai-mcp>=2,<3, interimmcp<2.0pins from Bump MCP dependencies across templates #19 removedmcp.server.fastmcp→mcp.server.mcpserver;streamable_http_pathmoved from the constructor tostreamable_http_app()keycardai-mcp 2.0.0+mcp 2.0.0and import cleanTypeScript — 3 templates
@keycardai/mcp ^2.0.0; v1@modelcontextprotocol/sdkreplaced by the v2 split:/server+/nodefor servers,/clientfor clients (Client,StreamableHTTPClientTransport, and the PRM discovery helpers all export from its root)server.tool(name, desc, shape, cb)→registerTool(name, {description, inputSchema}, cb)ctx.http.authInfo(wasextra.authInfo)^4: v2 types its schema overloads against zod 4, andz.recordnow requires an explicit key typeThe brokered TS template and snowflake-wif exercise the v2 client path (including PRM discovery), which the server templates don't — so this PR's CI run is also the first live test of that half against published packages.
CI verifies every changed template against a real ephemeral zone.
🤖 Generated with Claude Code